// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "TextInfos.h"

/**
 * 
 */
class MOTIONSUBTITLES_API FSdfGenUtils
{
public:
	static void GenerateSDF(const FString& SingleChar, const FString& FontPath, FTextFontInfo& FontInfo,
	                                      int32 FontSize = 4096, float Scale = 1);

private:
	static UTexture2DDynamic* CreateTexture2DDynamic(const int32 Width, const int32 Height,
	                                                 const TArrayView64<FColor>& Data);

	static TArray<uint8> ConvertColorArrayToUint8Array(const TArrayView64<FColor>& SrcData);
};
